<?php

namespace module\manage\validate\auth;

use app\Validate;

/*
 * 角色模型.
 *
 * @property integer $id
 */
class Role extends Validate
{
    protected $scene = [
        'save' => ['name','perms','memo']
    ];
    /*
     * @inheritdoc
     */
    public $rule = [
        'id' => 'require|integer|max:10',
		'name' => 'requireWithout:id|string',
		'perms' => 'requireWithout:id|array',
		'memo' => 'string|max:40'
    ];
    /*
     * @inheritdoc
     */
    public $field = [
        'id' => 'ID',
		'name' => '名称',
		'perms' => '权限',
		'memo' => '备注'
    ];
}
